package com.xzy.sms.web.system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Size;

import org.hibernate.annotations.GenericGenerator;

import com.xzyframework.persistence.BaseEntity;

/**
 * 配置项管理实体
 * 
 * @author macong
 * @since 1.0
 * @version 2013-12-30 macong
 */
@Entity
@Table(name = "pub_config")
public class Config extends BaseEntity {
    
    /** FIXME */
    private static final long serialVersionUID = -1087672480680679566L;
    
    /** 主键id */
    @Id
    @GeneratedValue(generator = "UIDGenerator")
    @GenericGenerator(name = "UIDGenerator", strategy = "com.xzyframework.persistence.UIDGenerator")
    @Column(length = 40)
    protected String id;
    
    /** 备注信息 */
    @Column(length = 255)
    @Size(min = 0, max = 255, message = "备注长度必须在255个字符以内")
    private String remarks;
    
    /** value值 */
    @Column(length = 400)
    private String cval;
    
    /** 中文名称 */
    @Transient
    private String cnName;
    
    /** 排序 */
    @Transient
    private int sort;
    
    /** 展示类型 */
    @Transient
    private String showType;
    
    /** 分组 */
    @Transient
    private String group;
    
    /** 是否显示 */
    @Transient
    private boolean isDisplay;
    
    /** 是否下发 */
    @Transient
    private boolean issued;
    
    /**
     * 构造函数
     * 
     * @param id id
     * @param remarks remarks
     * @param type type
     * @param cval cval
     */
    public Config(String id, String cval, String remarks) {
        this.id = id;
        this.remarks = remarks;
        this.cval = cval;
    }
    
    /**
     * @return group
     */
    public String getGroup() {
        return group;
    }
    
    /**
     * @param group 要设置的 group
     */
    public void setGroup(String group) {
        this.group = group;
    }
    
    /**
     * @return cnName
     */
    public String getCnName() {
        return cnName;
    }
    
    /**
     * @param cnName 要设置的 cnName
     */
    public void setCnName(String cnName) {
        this.cnName = cnName;
    }
    
    /**
     * @return showType
     */
    public String getShowType() {
        return showType;
    }
    
    /**
     * @param showType 要设置的 showType
     */
    public void setShowType(String showType) {
        this.showType = showType;
    }
    
    /**
     * 构造函数
     */
    public Config() {
    }
    
    /**
     * 构造函数
     * 
     * @param id id
     */
    public Config(String id) {
        this.id = id;
    }
    
    /**
     * @return id
     */
    public String getId() {
        return id;
    }
    
    /**
     * @param id 要设置的 id
     */
    public void setId(String id) {
        this.id = id;
    }
    
    /**
     * @return remarks
     */
    public String getRemarks() {
        return remarks;
    }
    
    /**
     * @param remarks 要设置的 remarks
     */
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    
    /**
     * @return cval
     */
    public String getCval() {
        return cval;
    }
    
    /**
     * @param cval 要设置的 cval
     */
    public void setCval(String cval) {
        this.cval = cval;
    }
    
    /**
     * @return sort
     */
    public int getSort() {
        return sort;
    }
    
    /**
     * @param sort 要设置的 sort
     */
    public void setSort(int sort) {
        this.sort = sort;
    }
    
    /**
     * @return isDisplay
     */
    public boolean isDisplay() {
        return isDisplay;
    }
    
    /**
     * @param isDisplay 要设置的 isDisplay
     */
    public void setDisplay(boolean isDisplay) {
        this.isDisplay = isDisplay;
    }
    
    /**
     * @return issued
     */
    public boolean isIssued() {
        return issued;
    }
    
    /**
     * @param issued 要设置的 issued
     */
    public void setIssued(boolean issued) {
        this.issued = issued;
    }
    
}
